ServerName https://kojipkgs.fedoraproject.org
MaxRequestWorkers 512
ServerLimit 512

RequestHeader unset Accept-Encoding early

CustomLog "| /usr/sbin/rotatelogs /var/log/httpd/{{inventory_hostname}}-access.log.%Y-%m-%d 86400" combined
ErrorLog "| /usr/sbin/rotatelogs /var/log/httpd/{{inventory_hostname}}-error.log.%Y-%m-%d 86400"

Alias /atomic /mnt/fedora_koji/koji/atomic

<Directory /mnt/fedora_koji/koji/atomic>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /atomic-cd /mnt/fedora_koji/koji/atomic-cd

<Directory /mnt/fedora_koji/koji/atomic-cd>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /packages /mnt/fedora_koji/koji/packages
Alias /toplink/packages /mnt/fedora_koji/koji/packages

<Directory /mnt/fedora_koji/koji/packages>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /repos-dist /mnt/fedora_koji/koji/repos-dist

<Directory /mnt/fedora_koji/koji/repos-dist>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /repos /mnt/fedora_koji/koji/repos

<Directory /mnt/fedora_koji/koji/repos>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /scratch /mnt/fedora_koji/koji/scratch

<Directory /mnt/fedora_koji/koji/scratch>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /work /mnt/fedora_koji/koji/work

<Directory /mnt/fedora_koji/koji/work>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /mash /mnt/fedora_koji/koji/mash

<Directory /mnt/fedora_koji/koji/mash>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /compose /mnt/fedora_koji/koji/compose

<Directory /mnt/fedora_koji/koji/compose>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /mass-rebuild "/mnt/fedora_koji/koji/mass-rebuild/"

<Directory "/mnt/fedora_koji/koji/mass-rebuild/">
    Options Indexes FollowSymLinks
    Require all granted
</Directory>

Alias /images /mnt/fedora_koji/koji/images

<Directory /mnt/fedora_koji/koji/images>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /rhel /mnt/fedora_koji/rhel

<Directory /mnt/fedora_koji/rhel>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /pub /pub

<Directory /pub>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

# This IP is sign-bridge01.phx2.fedoraproject.org.
# It needs to be able to sign openh264 packages.
RewriteCond %{HTTP:X-Forwarded-For} !10.5.125.71
RewriteRule ".*/.*openh264.*.(x86_64|armv7hl|i686|ppc64|ppc64le|aarch64|s390x).rpm$" "https://fedoraproject.org/wiki/non-distributable-rpms" [R=302,L]

# Set HSTS header via HTTP since it cannot be easily set in squid, which terminates HTTPS
Header always add Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
